<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="init.jsp"%>
<%@ taglib uri="controls" prefix="z"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>学生主动预约教员信息录入</title>
			<link rel="stylesheet" type="text/css"
			href="${ctx }/plugins/autocomplete/jquery.autocomplete.css" />
		<script src="${ctx }/plugins/autocomplete/jquery.autocomplete.js" type="text/javascript" ></script>
<script type="text/javascript">
//输入值检查
function CheckValue() {
	var teacherId  = $("#teacherId").val();
	var studentId  = $("#studentId").val();
	if(studentId == "") {
		 jAlert("学员编号不能为空","系统提示");
		 return false;
	} else if(teacherId == "") {
		 jAlert("教员编号不能为空","系统提示");
		 return false;
	}
	return true;
}

$(function(){
	jQuery("#teacherId").autocomplete("bookingstudent!queryteacher.action", {
       caption:"输入教员编号",
       minChars: 0,
       mustMatch: true,
       matchContains:true,
       max:50
	});
	jQuery("#studentId").autocomplete("bookingstudent!querystudent.action", {
       caption:"输入学员编号",
       minChars: 0,
       mustMatch: true,
       matchContains:true,
       max:50
	});
});

</script>

		<style type="text/css">
.sel-disabled {
	background-color: #ccc
}
</style>

	</head>
	<body>
		<form method="post" action="${ctx }/admin/bookingteacher!save.action"
			onsubmit="return CheckValue(this)">
			<table border="0" cellpadding="0" align="center" cellspacing="0"
				 width="738">
				<tbody>
					<tr class="titlebg">
						<td align="center" height="25">
							<strong>学生主动预约教员信息录入</strong>
						</td>
					</tr>
					<tr>
						<td align="left" height="25" valign="top">
							<table border="0" cellpadding="1" cellspacing="1" width="751">
								<tbody>
									<tr class="trbgc">
										<td align="right" height="30" valign="middle">
											请输入学员编号:
										</td>
										<td align="left" height="30" valign="middle">
											<input type="text" id="studentId" name="studentId"/>
										</td>
									</tr>
									<tr class="trbgc1">
										<td align="right" height="30" valign="middle">
											请输入教员编号:
										</td>
										<td align="left" height="30" valign="middle" >
											<input type="text" id="teacherId" name="teacherId"/>
										</td>
										
									</tr>
									<tr class="trbgc">
										<td align="center" colspan="2" height="30" valign="middle">
											<input type="submit" value="提交"/>
											<input type="reset" value="重置"/>
										</td>
									</tr>
								</tbody>
							</table>
						</td>
					</tr>

				</tbody>
			</table>
		</form>
	</body>
</html>